<template>
  <div class="ucenter app-space">
    <!-- header -->
    <Search />
    <!-- main -->

    <div class="news_overflow">
      <div class="wrapper">
        <div class="news-ad">
          <router-link to="/">
            <img src="../../assets/news-ad.jpg" alt />
          </router-link>
        </div>
        <van-tabs v-model="activeTab" :animated="true">
          <!-- 政策法规 -->
          <van-tab title="政策法规">
            <policy-support></policy-support>
          </van-tab>

          <!-- 新闻资讯 -->
          <van-tab title="新闻资讯">
            <news-information></news-information>
          </van-tab>
        </van-tabs>
      </div>
    </div>

    <!-- footer -->
    <van-tabbar :z-index="999" v-model="active" :placeholder="true">
      <van-tabbar-item icon="tongxunlu" to="/SignIndex">报名</van-tabbar-item>
      <van-tabbar-item icon="zixun" to="/News">资讯</van-tabbar-item>
      <van-tabbar-item icon="faxian" to="/">考试</van-tabbar-item>
      <van-tabbar-item icon="home" @click="link">商城</van-tabbar-item>
      <van-tabbar-item icon="wode" to="/Ucenter">我的</van-tabbar-item>
    </van-tabbar>
  </div>
</template>
<script>
// 引入行业资讯和政策法规组件
import PolicySupport from "./PolicySupport";
import NewsInformation from "./NewsInformation";

import Search from "../sign/search";

// 引入接口api
// import { advertising } from "../../assets/js/api/News";
// 引入资讯接口

export default {
  data() {
    return {
      active: 1,
      activeTab: 0,
      lid: "",

      extent: "" // 咨询接口总长度
    };
  },

  components: {
    Search,
    NewsInformation,
    PolicySupport
  },
  mounted() {
    // advertising().then(res => {
    //   // console.log(res);
    // });
  },

  methods: {
    //跳转页面
    href(url, id) {
      this.$router.push({ path: `${url}/${id}` });
    },
    link() {
      window.open(
        "https://www.guazi.com/sjz/?ca_n=pcbiaoti&ca_s=pz_baidu&tk_p_mti=ad.pz_baidu.pcbiaoti.1.112642602791964672",
        "_blank"
      );
    }
  }
};
</script>
<style></style>
